﻿namespace Validate.Net.Core
{
    /// <summary>
    /// 表示区间的无穷
    /// <para>无穷大或无穷小</para>
    /// </summary>
    public enum RangeValue
    {
        /// <summary>
        /// 表示区间的无穷
        /// <para>无穷大或无穷小</para>
        /// </summary>
        Infinity
    }

    public static class RangeValueExtension
    {
        internal static string ToString(this object value, string symbol)
        {
            if (value is RangeValue)
            {
                return $"{symbol}∞";
            }
            return value.ToString();
        }
    }
}
